1. Field of the Invention
The present invention relates to a recording apparatus, and particularly an apparatus for recording moving image data to a recording medium configured of a plurality of sectors.
2. Description of the Related Art
In recent years, moving image data captured with a digital camera or a digital video camera are recorded on a recording medium such as a CF (CompactFlash®) card or the like in accordance with Audio Visual Interleaving file (hereinafter referred to as AVI file) format or MPEG (Moving Picture Experts Group) format to enjoy a reproduced image. Further, the capacity of the recording medium has been increasing year by year, and an amount of time to record a moving image file is becoming longer. Consequently, a video camera capable of performing an editing operation has also come on the market, which can reproduce the moving image data immediately after photographing and when an unnecessary portion is found, delete the unnecessary portion on the spot.
For instance, in the case of deleting a part of the AVI file, the video camera performs the following processing.
First, on a memory card, image and audio data are read from an address having valid data subsequent to a portion to be deleted, and are stored in the memory of a video camera body. Further, the data stored in the memory are written from the front (initial) address of the deleted data on the memory card. In this manner, the reading and writing process of data from and to the memory card is repeated in a predetermined amount of data as a unit, and finally, a file size of the AVI file is set, except for an area to be deleted.
In the case of deleting a part of the AVI file in this manner, the reading and writing process of data from and to the memory card is thus repeated.
Accordingly, there arises a problem in that as the file size becomes larger, an amount of time consumed by edit processing becomes longer too.
With respect to this problem, Japanese Patent Application Laid-Open No. 2003-52006 discloses a method for reducing the writing and reading process of data to and from the recording medium in the case of deleting a part of data.
In Japanese Patent Application Laid-Open No. 2003-52006, first, a cluster including only a frame to be partially deleted is deleted by a file system.
Next, dummy data are written into a recording area of the deleted data in the cluster including data to be deleted as well as data not to be deleted. In a case where the dummy data having one cluster or more are inserted, the data not to be deleted are moved. Then, the cluster including only the data to be deleted is set as an unused area on the file system. By the above processing, work for reading and writing of data to the recording medium is decreased, and time consumed by the edit processing is reduced.
However, in Japanese Patent Application Laid-Open No. 2003-52006, when the dummy data having one cluster or more are present, reading and writing of data to the memory card occurs since the valid data has to be moved. As a result, the above patent reference has a problem in that the editing operation consumes much time.